.class public final Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;
.super Ljava/util/AbstractMap;
.source "ConcurrentIdentityHashMap.java"

# interfaces
.implements Ljava/util/concurrent/ConcurrentMap;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$EntrySet;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Values;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$KeySet;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$EntryIterator;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$WriteThroughEntry;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$SimpleEntry;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$ValueIterator;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$KeyIterator;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$HashIterator;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;,
        Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$HashEntry;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<K:",
        "Ljava/lang/Object;",
        "V:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/util/AbstractMap",
        "<TK;TV;>;",
        "Ljava/util/concurrent/ConcurrentMap",
        "<TK;TV;>;"
    }
.end annotation


# static fields
.field static final DEFAULT_CONCURRENCY_LEVEL:I = 0x10

.field static final DEFAULT_INITIAL_CAPACITY:I = 0x10

.field static final DEFAULT_LOAD_FACTOR:F = 0.75f

.field static final MAXIMUM_CAPACITY:I = 0x40000000

.field static final MAX_SEGMENTS:I = 0x10000

.field static final RETRIES_BEFORE_LOCK:I = 0x2


# instance fields
.field entrySet:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Ljava/util/Map$Entry",
            "<TK;TV;>;>;"
        }
    .end annotation
.end field

.field keySet:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<TK;>;"
        }
    .end annotation
.end field

.field final segmentMask:I

.field final segmentShift:I

.field final segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "[",
            "Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment",
            "<TK;TV;>;"
        }
    .end annotation
.end field

.field values:Ljava/util/Collection;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Collection",
            "<TV;>;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    const/16 v1, 0x10

    .line 672
    const/high16 v0, 0x3f40

    invoke-direct {p0, v1, v0, v1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;-><init>(IFI)V

    .line 673
    return-void
.end method

.method public constructor <init>(I)V
    .locals 2
    .parameter "initialCapacity"

    .prologue
    .line 663
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    const/high16 v0, 0x3f40

    const/16 v1, 0x10

    invoke-direct {p0, p1, v0, v1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;-><init>(IFI)V

    .line 664
    return-void
.end method

.method public constructor <init>(IF)V
    .locals 1
    .parameter "initialCapacity"
    .parameter "loadFactor"

    .prologue
    .line 649
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    const/16 v0, 0x10

    invoke-direct {p0, p1, p2, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;-><init>(IFI)V

    .line 650
    return-void
.end method

.method public constructor <init>(IFI)V
    .locals 7
    .parameter "initialCapacity"
    .parameter "loadFactor"
    .parameter "concurrencyLevel"

    .prologue
    .line 596
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    invoke-direct {p0}, Ljava/util/AbstractMap;-><init>()V

    .line 597
    const/4 v5, 0x0

    cmpl-float v5, p2, v5

    if-lez v5, :cond_0

    if-ltz p1, :cond_0

    if-gtz p3, :cond_1

    .line 598
    :cond_0
    new-instance v5, Ljava/lang/IllegalArgumentException;

    invoke-direct {v5}, Ljava/lang/IllegalArgumentException;-><init>()V

    throw v5

    .line 601
    :cond_1
    const/high16 v5, 0x1

    if-le p3, v5, :cond_2

    .line 602
    const/high16 p3, 0x1

    .line 606
    :cond_2
    const/4 v3, 0x0

    .line 607
    .local v3, sshift:I
    const/4 v4, 0x1

    .line 608
    .local v4, ssize:I
    :goto_0
    if-ge v4, p3, :cond_3

    .line 609
    add-int/lit8 v3, v3, 0x1

    .line 610
    shl-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 612
    :cond_3
    rsub-int/lit8 v5, v3, 0x20

    iput v5, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentShift:I

    .line 613
    add-int/lit8 v5, v4, -0x1

    iput v5, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentMask:I

    .line 614
    invoke-static {v4}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->newArray(I)[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    move-result-object v5

    iput-object v5, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    .line 616
    const/high16 v5, 0x4000

    if-le p1, v5, :cond_4

    .line 617
    const/high16 p1, 0x4000

    .line 619
    :cond_4
    div-int v0, p1, v4

    .line 620
    .local v0, c:I
    mul-int v5, v0, v4

    if-ge v5, p1, :cond_5

    .line 621
    add-int/lit8 v0, v0, 0x1

    .line 623
    :cond_5
    const/4 v1, 0x1

    .line 624
    .local v1, cap:I
    :goto_1
    if-ge v1, v0, :cond_6

    .line 625
    shl-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 628
    :cond_6
    const/4 v2, 0x0

    .local v2, i:I
    :goto_2
    iget-object v5, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    array-length v5, v5

    if-ge v2, v5, :cond_7

    .line 629
    iget-object v5, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    new-instance v6, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    invoke-direct {v6, v1, p2}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;-><init>(IF)V

    aput-object v6, v5, v2

    .line 628
    add-int/lit8 v2, v2, 0x1

    goto :goto_2

    .line 631
    :cond_7
    return-void
.end method

.method public constructor <init>(Ljava/util/Map;)V
    .locals 3
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<+TK;+TV;>;)V"
        }
    .end annotation

    .prologue
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    .local p1, m:Ljava/util/Map;,"Ljava/util/Map<+TK;+TV;>;"
    const/16 v2, 0x10

    const/high16 v1, 0x3f40

    .line 684
    invoke-interface {p1}, Ljava/util/Map;->size()I

    move-result v0

    int-to-float v0, v0

    div-float/2addr v0, v1

    float-to-int v0, v0

    add-int/lit8 v0, v0, 0x1

    invoke-static {v0, v2}, Ljava/lang/Math;->max(II)I

    move-result v0

    invoke-direct {p0, v0, v1, v2}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;-><init>(IFI)V

    .line 687
    invoke-virtual {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->putAll(Ljava/util/Map;)V

    .line 688
    return-void
.end method

.method private static hash(I)I
    .locals 2
    .parameter "h"

    .prologue
    .line 120
    shl-int/lit8 v0, p0, 0xf

    xor-int/lit16 v0, v0, -0x3283

    add-int/2addr p0, v0

    .line 121
    ushr-int/lit8 v0, p0, 0xa

    xor-int/2addr p0, v0

    .line 122
    shl-int/lit8 v0, p0, 0x3

    add-int/2addr p0, v0

    .line 123
    ushr-int/lit8 v0, p0, 0x6

    xor-int/2addr p0, v0

    .line 124
    shl-int/lit8 v0, p0, 0x2

    shl-int/lit8 v1, p0, 0xe

    add-int/2addr v0, v1

    add-int/2addr p0, v0

    .line 125
    ushr-int/lit8 v0, p0, 0x10

    xor-int/2addr v0, p0

    return v0
.end method

.method private hashOf(Ljava/lang/Object;)I
    .locals 1
    .parameter "key"

    .prologue
    .line 139
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    invoke-static {p1}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I

    move-result v0

    invoke-static {v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->hash(I)I

    move-result v0

    return v0
.end method


# virtual methods
.method public clear()V
    .locals 2

    .prologue
    .line 1000
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v1, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    array-length v1, v1

    if-ge v0, v1, :cond_0

    .line 1001
    iget-object v1, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    aget-object v1, v1, v0

    invoke-virtual {v1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->clear()V

    .line 1000
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 1003
    :cond_0
    return-void
.end method

.method public contains(Ljava/lang/Object;)Z
    .locals 1
    .parameter "value"

    .prologue
    .line 893
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    invoke-virtual {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->containsValue(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public containsKey(Ljava/lang/Object;)Z
    .locals 2
    .parameter "key"

    .prologue
    .line 811
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    invoke-direct {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->hashOf(Ljava/lang/Object;)I

    move-result v0

    .line 812
    .local v0, hash:I
    invoke-virtual {p0, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentFor(I)Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    move-result-object v1

    invoke-virtual {v1, p1, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->containsKey(Ljava/lang/Object;I)Z

    move-result v1

    return v1
.end method

.method public containsValue(Ljava/lang/Object;)Z
    .locals 9
    .parameter "value"

    .prologue
    .line 828
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    if-nez p1, :cond_0

    .line 829
    new-instance v7, Ljava/lang/NullPointerException;

    invoke-direct {v7}, Ljava/lang/NullPointerException;-><init>()V

    throw v7

    .line 834
    :cond_0
    iget-object v6, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    .line 835
    .local v6, segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;,"[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment<TK;TV;>;"
    array-length v7, v6

    new-array v4, v7, [I

    .line 838
    .local v4, mc:[I
    const/4 v3, 0x0

    .local v3, k:I
    :goto_0
    const/4 v7, 0x2

    if-ge v3, v7, :cond_7

    .line 839
    const/4 v5, 0x0

    .line 840
    .local v5, mcsum:I
    const/4 v2, 0x0

    .local v2, i:I
    :goto_1
    array-length v7, v6

    if-ge v2, v7, :cond_3

    .line 841
    aget-object v7, v6, v2

    iget v7, v7, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->modCount:I

    aput v7, v4, v2

    add-int/2addr v5, v7

    .line 842
    aget-object v7, v6, v2

    invoke-virtual {v7, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->containsValue(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_2

    .line 843
    const/4 v1, 0x1

    .line 876
    .end local v5           #mcsum:I
    :cond_1
    :goto_2
    return v1

    .line 840
    .restart local v5       #mcsum:I
    :cond_2
    add-int/lit8 v2, v2, 0x1

    goto :goto_1

    .line 846
    :cond_3
    const/4 v0, 0x1

    .line 847
    .local v0, cleanSweep:Z
    if-eqz v5, :cond_4

    .line 848
    const/4 v2, 0x0

    :goto_3
    array-length v7, v6

    if-ge v2, v7, :cond_4

    .line 849
    aget v7, v4, v2

    aget-object v8, v6, v2

    iget v8, v8, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->modCount:I

    if-eq v7, v8, :cond_5

    .line 850
    const/4 v0, 0x0

    .line 855
    :cond_4
    if-eqz v0, :cond_6

    .line 856
    const/4 v1, 0x0

    goto :goto_2

    .line 848
    :cond_5
    add-int/lit8 v2, v2, 0x1

    goto :goto_3

    .line 838
    :cond_6
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 860
    .end local v0           #cleanSweep:Z
    .end local v2           #i:I
    .end local v5           #mcsum:I
    :cond_7
    const/4 v2, 0x0

    .restart local v2       #i:I
    :goto_4
    array-length v7, v6

    if-ge v2, v7, :cond_8

    .line 861
    aget-object v7, v6, v2

    invoke-virtual {v7}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->lock()V

    .line 860
    add-int/lit8 v2, v2, 0x1

    goto :goto_4

    .line 863
    :cond_8
    const/4 v1, 0x0

    .line 865
    .local v1, found:Z
    const/4 v2, 0x0

    :goto_5
    :try_start_0
    array-length v7, v6

    if-ge v2, v7, :cond_9

    .line 866
    aget-object v7, v6, v2

    invoke-virtual {v7, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->containsValue(Ljava/lang/Object;)Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v7

    if-eqz v7, :cond_a

    .line 867
    const/4 v1, 0x1

    .line 872
    :cond_9
    const/4 v2, 0x0

    :goto_6
    array-length v7, v6

    if-ge v2, v7, :cond_1

    .line 873
    aget-object v7, v6, v2

    invoke-virtual {v7}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->unlock()V

    .line 872
    add-int/lit8 v2, v2, 0x1

    goto :goto_6

    .line 865
    :cond_a
    add-int/lit8 v2, v2, 0x1

    goto :goto_5

    .line 872
    :cond_b
    throw v7

    :catchall_0
    move-exception v7

    const/4 v2, 0x0

    :goto_7
    array-length v8, v6

    if-ge v2, v8, :cond_b

    .line 873
    aget-object v8, v6, v2

    invoke-virtual {v8}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->unlock()V

    .line 872
    add-int/lit8 v2, v2, 0x1

    goto :goto_7
.end method

.method public elements()Ljava/util/Enumeration;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Enumeration",
            "<TV;>;"
        }
    .end annotation

    .prologue
    .line 1085
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    new-instance v0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$ValueIterator;

    invoke-direct {v0, p0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$ValueIterator;-><init>(Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;)V

    return-object v0
.end method

.method public entrySet()Ljava/util/Set;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Set",
            "<",
            "Ljava/util/Map$Entry",
            "<TK;TV;>;>;"
        }
    .end annotation

    .prologue
    .line 1064
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    iget-object v0, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->entrySet:Ljava/util/Set;

    .line 1065
    .local v0, es:Ljava/util/Set;,"Ljava/util/Set<Ljava/util/Map$Entry<TK;TV;>;>;"
    if-eqz v0, :cond_0

    .end local v0           #es:Ljava/util/Set;,"Ljava/util/Set<Ljava/util/Map$Entry<TK;TV;>;>;"
    :goto_0
    return-object v0

    .restart local v0       #es:Ljava/util/Set;,"Ljava/util/Set<Ljava/util/Map$Entry<TK;TV;>;>;"
    :cond_0
    new-instance v0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$EntrySet;

    .end local v0           #es:Ljava/util/Set;,"Ljava/util/Set<Ljava/util/Map$Entry<TK;TV;>;>;"
    invoke-direct {v0, p0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$EntrySet;-><init>(Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;)V

    iput-object v0, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->entrySet:Ljava/util/Set;

    goto :goto_0
.end method

.method public get(Ljava/lang/Object;)Ljava/lang/Object;
    .locals 2
    .parameter "key"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Object;",
            ")TV;"
        }
    .end annotation

    .prologue
    .line 796
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    invoke-direct {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->hashOf(Ljava/lang/Object;)I

    move-result v0

    .line 797
    .local v0, hash:I
    invoke-virtual {p0, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentFor(I)Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    move-result-object v1

    invoke-virtual {v1, p1, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->get(Ljava/lang/Object;I)Ljava/lang/Object;

    move-result-object v1

    return-object v1
.end method

.method public isEmpty()Z
    .locals 7

    .prologue
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    const/4 v4, 0x0

    .line 697
    iget-object v3, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    .line 706
    .local v3, segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;,"[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment<TK;TV;>;"
    array-length v5, v3

    new-array v1, v5, [I

    .line 707
    .local v1, mc:[I
    const/4 v2, 0x0

    .line 708
    .local v2, mcsum:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    array-length v5, v3

    if-ge v0, v5, :cond_2

    .line 709
    aget-object v5, v3, v0

    iget v5, v5, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->count:I

    if-eqz v5, :cond_1

    .line 725
    :cond_0
    :goto_1
    return v4

    .line 712
    :cond_1
    aget-object v5, v3, v0

    iget v5, v5, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->modCount:I

    aput v5, v1, v0

    add-int/2addr v2, v5

    .line 708
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 718
    :cond_2
    if-eqz v2, :cond_3

    .line 719
    const/4 v0, 0x0

    :goto_2
    array-length v5, v3

    if-ge v0, v5, :cond_3

    .line 720
    aget-object v5, v3, v0

    iget v5, v5, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->count:I

    if-nez v5, :cond_0

    aget v5, v1, v0

    aget-object v6, v3, v0

    iget v6, v6, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->modCount:I

    if-ne v5, v6, :cond_0

    .line 719
    add-int/lit8 v0, v0, 0x1

    goto :goto_2

    .line 725
    :cond_3
    const/4 v4, 0x1

    goto :goto_1
.end method

.method public keySet()Ljava/util/Set;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Set",
            "<TK;>;"
        }
    .end annotation

    .prologue
    .line 1022
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    iget-object v0, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->keySet:Ljava/util/Set;

    .line 1023
    .local v0, ks:Ljava/util/Set;,"Ljava/util/Set<TK;>;"
    if-eqz v0, :cond_0

    .end local v0           #ks:Ljava/util/Set;,"Ljava/util/Set<TK;>;"
    :goto_0
    return-object v0

    .restart local v0       #ks:Ljava/util/Set;,"Ljava/util/Set<TK;>;"
    :cond_0
    new-instance v0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$KeySet;

    .end local v0           #ks:Ljava/util/Set;,"Ljava/util/Set<TK;>;"
    invoke-direct {v0, p0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$KeySet;-><init>(Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;)V

    iput-object v0, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->keySet:Ljava/util/Set;

    goto :goto_0
.end method

.method public keys()Ljava/util/Enumeration;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Enumeration",
            "<TK;>;"
        }
    .end annotation

    .prologue
    .line 1075
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    new-instance v0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$KeyIterator;

    invoke-direct {v0, p0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$KeyIterator;-><init>(Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;)V

    return-object v0
.end method

.method public put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    .locals 3
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TK;TV;)TV;"
        }
    .end annotation

    .prologue
    .line 911
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    .local p1, key:Ljava/lang/Object;,"TK;"
    .local p2, value:Ljava/lang/Object;,"TV;"
    if-nez p2, :cond_0

    .line 912
    new-instance v1, Ljava/lang/NullPointerException;

    invoke-direct {v1}, Ljava/lang/NullPointerException;-><init>()V

    throw v1

    .line 914
    :cond_0
    invoke-direct {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->hashOf(Ljava/lang/Object;)I

    move-result v0

    .line 915
    .local v0, hash:I
    invoke-virtual {p0, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentFor(I)Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, p1, v0, p2, v2}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->put(Ljava/lang/Object;ILjava/lang/Object;Z)Ljava/lang/Object;

    move-result-object v1

    return-object v1
.end method

.method public putAll(Ljava/util/Map;)V
    .locals 4
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<+TK;+TV;>;)V"
        }
    .end annotation

    .prologue
    .line 940
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    .local p1, m:Ljava/util/Map;,"Ljava/util/Map<+TK;+TV;>;"
    invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/Map$Entry;

    .line 941
    .local v0, e:Ljava/util/Map$Entry;,"Ljava/util/Map$Entry<+TK;+TV;>;"
    invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v2

    invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {p0, v2, v3}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_0

    .line 943
    .end local v0           #e:Ljava/util/Map$Entry;,"Ljava/util/Map$Entry<+TK;+TV;>;"
    :cond_0
    return-void
.end method

.method public putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    .locals 3
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TK;TV;)TV;"
        }
    .end annotation

    .prologue
    .line 924
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    .local p1, key:Ljava/lang/Object;,"TK;"
    .local p2, value:Ljava/lang/Object;,"TV;"
    if-nez p2, :cond_0

    .line 925
    new-instance v1, Ljava/lang/NullPointerException;

    invoke-direct {v1}, Ljava/lang/NullPointerException;-><init>()V

    throw v1

    .line 927
    :cond_0
    invoke-direct {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->hashOf(Ljava/lang/Object;)I

    move-result v0

    .line 928
    .local v0, hash:I
    invoke-virtual {p0, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentFor(I)Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {v1, p1, v0, p2, v2}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->put(Ljava/lang/Object;ILjava/lang/Object;Z)Ljava/lang/Object;

    move-result-object v1

    return-object v1
.end method

.method public remove(Ljava/lang/Object;)Ljava/lang/Object;
    .locals 4
    .parameter "key"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Object;",
            ")TV;"
        }
    .end annotation

    .prologue
    .line 956
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    invoke-direct {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->hashOf(Ljava/lang/Object;)I

    move-result v0

    .line 957
    .local v0, hash:I
    invoke-virtual {p0, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentFor(I)Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    move-result-object v1

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-virtual {v1, p1, v0, v2, v3}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->remove(Ljava/lang/Object;ILjava/lang/Object;Z)Ljava/lang/Object;

    move-result-object v1

    return-object v1
.end method

.method public remove(Ljava/lang/Object;Ljava/lang/Object;)Z
    .locals 3
    .parameter "key"
    .parameter "value"

    .prologue
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    const/4 v1, 0x0

    .line 964
    invoke-direct {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->hashOf(Ljava/lang/Object;)I

    move-result v0

    .line 965
    .local v0, hash:I
    if-nez p2, :cond_1

    .line 968
    :cond_0
    :goto_0
    return v1

    :cond_1
    invoke-virtual {p0, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentFor(I)Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    move-result-object v2

    invoke-virtual {v2, p1, v0, p2, v1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->remove(Ljava/lang/Object;ILjava/lang/Object;Z)Ljava/lang/Object;

    move-result-object v2

    if-eqz v2, :cond_0

    const/4 v1, 0x1

    goto :goto_0
.end method

.method public replace(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    .locals 2
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TK;TV;)TV;"
        }
    .end annotation

    .prologue
    .line 988
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    .local p1, key:Ljava/lang/Object;,"TK;"
    .local p2, value:Ljava/lang/Object;,"TV;"
    if-nez p2, :cond_0

    .line 989
    new-instance v1, Ljava/lang/NullPointerException;

    invoke-direct {v1}, Ljava/lang/NullPointerException;-><init>()V

    throw v1

    .line 991
    :cond_0
    invoke-direct {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->hashOf(Ljava/lang/Object;)I

    move-result v0

    .line 992
    .local v0, hash:I
    invoke-virtual {p0, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentFor(I)Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    move-result-object v1

    invoke-virtual {v1, p1, v0, p2}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->replace(Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    return-object v1
.end method

.method public replace(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
    .locals 2
    .parameter
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TK;TV;TV;)Z"
        }
    .end annotation

    .prologue
    .line 975
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    .local p1, key:Ljava/lang/Object;,"TK;"
    .local p2, oldValue:Ljava/lang/Object;,"TV;"
    .local p3, newValue:Ljava/lang/Object;,"TV;"
    if-eqz p2, :cond_0

    if-nez p3, :cond_1

    .line 976
    :cond_0
    new-instance v1, Ljava/lang/NullPointerException;

    invoke-direct {v1}, Ljava/lang/NullPointerException;-><init>()V

    throw v1

    .line 978
    :cond_1
    invoke-direct {p0, p1}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->hashOf(Ljava/lang/Object;)I

    move-result v0

    .line 979
    .local v0, hash:I
    invoke-virtual {p0, v0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentFor(I)Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    move-result-object v1

    invoke-virtual {v1, p1, v0, p2, p3}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->replace(Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/Object;)Z

    move-result v1

    return v1
.end method

.method segmentFor(I)Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;
    .locals 3
    .parameter "hash"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I)",
            "Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment",
            "<TK;TV;>;"
        }
    .end annotation

    .prologue
    .line 135
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    iget-object v0, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    iget v1, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentShift:I

    ushr-int v1, p1, v1

    iget v2, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segmentMask:I

    and-int/2addr v1, v2

    aget-object v0, v0, v1

    return-object v0
.end method

.method public size()I
    .locals 11

    .prologue
    .line 737
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    iget-object v6, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;

    .line 738
    .local v6, segments:[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;,"[Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment<TK;TV;>;"
    const-wide/16 v7, 0x0

    .line 739
    .local v7, sum:J
    const-wide/16 v0, 0x0

    .line 740
    .local v0, check:J
    array-length v9, v6

    new-array v4, v9, [I

    .line 743
    .local v4, mc:[I
    const/4 v3, 0x0

    .local v3, k:I
    :goto_0
    const/4 v9, 0x2

    if-ge v3, v9, :cond_2

    .line 744
    const-wide/16 v0, 0x0

    .line 745
    const-wide/16 v7, 0x0

    .line 746
    const/4 v5, 0x0

    .line 747
    .local v5, mcsum:I
    const/4 v2, 0x0

    .local v2, i:I
    :goto_1
    array-length v9, v6

    if-ge v2, v9, :cond_0

    .line 748
    aget-object v9, v6, v2

    iget v9, v9, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->count:I

    int-to-long v9, v9

    add-long/2addr v7, v9

    .line 749
    aget-object v9, v6, v2

    iget v9, v9, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->modCount:I

    aput v9, v4, v2

    add-int/2addr v5, v9

    .line 747
    add-int/lit8 v2, v2, 0x1

    goto :goto_1

    .line 751
    :cond_0
    if-eqz v5, :cond_1

    .line 752
    const/4 v2, 0x0

    :goto_2
    array-length v9, v6

    if-ge v2, v9, :cond_1

    .line 753
    aget-object v9, v6, v2

    iget v9, v9, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->count:I

    int-to-long v9, v9

    add-long/2addr v0, v9

    .line 754
    aget v9, v4, v2

    aget-object v10, v6, v2

    iget v10, v10, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->modCount:I

    if-eq v9, v10, :cond_3

    .line 755
    const-wide/16 v0, -0x1

    .line 760
    :cond_1
    cmp-long v9, v0, v7

    if-nez v9, :cond_4

    .line 764
    .end local v2           #i:I
    .end local v5           #mcsum:I
    :cond_2
    cmp-long v9, v0, v7

    if-eqz v9, :cond_7

    .line 765
    const-wide/16 v7, 0x0

    .line 766
    const/4 v2, 0x0

    .restart local v2       #i:I
    :goto_3
    array-length v9, v6

    if-ge v2, v9, :cond_5

    .line 767
    aget-object v9, v6, v2

    invoke-virtual {v9}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->lock()V

    .line 766
    add-int/lit8 v2, v2, 0x1

    goto :goto_3

    .line 752
    .restart local v5       #mcsum:I
    :cond_3
    add-int/lit8 v2, v2, 0x1

    goto :goto_2

    .line 743
    :cond_4
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 769
    .end local v5           #mcsum:I
    :cond_5
    const/4 v2, 0x0

    :goto_4
    array-length v9, v6

    if-ge v2, v9, :cond_6

    .line 770
    aget-object v9, v6, v2

    iget v9, v9, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->count:I

    int-to-long v9, v9

    add-long/2addr v7, v9

    .line 769
    add-int/lit8 v2, v2, 0x1

    goto :goto_4

    .line 772
    :cond_6
    const/4 v2, 0x0

    :goto_5
    array-length v9, v6

    if-ge v2, v9, :cond_7

    .line 773
    aget-object v9, v6, v2

    invoke-virtual {v9}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Segment;->unlock()V

    .line 772
    add-int/lit8 v2, v2, 0x1

    goto :goto_5

    .line 776
    .end local v2           #i:I
    :cond_7
    const-wide/32 v9, 0x7fffffff

    cmp-long v9, v7, v9

    if-lez v9, :cond_8

    .line 777
    const v9, 0x7fffffff

    .line 779
    :goto_6
    return v9

    :cond_8
    long-to-int v9, v7

    goto :goto_6
.end method

.method public values()Ljava/util/Collection;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Collection",
            "<TV;>;"
        }
    .end annotation

    .prologue
    .line 1043
    .local p0, this:Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;,"Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap<TK;TV;>;"
    iget-object v0, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->values:Ljava/util/Collection;

    .line 1044
    .local v0, vs:Ljava/util/Collection;,"Ljava/util/Collection<TV;>;"
    if-eqz v0, :cond_0

    .end local v0           #vs:Ljava/util/Collection;,"Ljava/util/Collection<TV;>;"
    :goto_0
    return-object v0

    .restart local v0       #vs:Ljava/util/Collection;,"Ljava/util/Collection<TV;>;"
    :cond_0
    new-instance v0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Values;

    .end local v0           #vs:Ljava/util/Collection;,"Ljava/util/Collection<TV;>;"
    invoke-direct {v0, p0}, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap$Values;-><init>(Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;)V

    iput-object v0, p0, Lorg/jboss/netty/util/internal/ConcurrentIdentityHashMap;->values:Ljava/util/Collection;

    goto :goto_0
.end method
